<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%
    String rootPath = request.getContextPath();
%>
<!DOCTYPE>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>用户升级成商铺</title>
<meta name="viewport" content="initial-scale=1, maximum-scale=1" />
<meta name="apple-mobile-web-app-capable" content="yes" />
<meta name="apple-mobile-web-app-status-bar-style" content="black" />
<link rel="stylesheet"
	href="//g.alicdn.com/msui/sm/0.6.2/css/sm.min.css" />
<link rel="stylesheet"
	href="//g.alicdn.com/msui/sm/0.6.2/css/sm-extend.min.css" />
<!-- 	<link href="http://cdn.static.runoob.com/libs/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet"> -->
<link rel="stylesheet" href="../static/weixin.css" />

</head>
<body>
	<header class="bar bar-nav">
        <a class="icon icon-me pull-left open-panel"></a>
        <h1 class="title">会员升级申请 <font color='red'><c:if test="${memberShopReq.reqstate==1}">已升级为商铺</c:if> 
        <c:if test="${memberShopReq.reqstate==-1}">申请被驳回，不能升级为商铺</c:if></font> </h1>
        
    </header>
  
	<div class="content">
	  <div class="list-block">
	    <ul>
	   	 <li>
	        <div class="item-content">
	          <div class="item-inner">
	            <div class="item-title label"></div>
	            <div class="item-input"><img src="${userinfo.headimgurl}" width="40%"></div>
	          </div>
	        </div>
	      </li>
      
	      <li>
	        <div class="item-content">
	          <div class="item-inner">
	            <div class="item-title label">昵称</div>
	            <div class="item-input">${userinfo.nickname}  
	            <input type="hidden" name="reqopenId" id="reqopenId" value="${reqopenId}"/></div>
	          </div>
	        </div>
	      </li>
	      
	      <li>
	        <div class="item-content">
	          <div class="item-inner">
	            <div class="item-title label">性别</div>
	            <div class="item-input">${userinfo.sex}
				<c:choose>
				   <c:when test="${userinfo.sex==1}">  
				        男   
				   </c:when>
				    <c:when test="${userinfo.sex==0}">  
				        女  
				   </c:when>
				   <c:otherwise> 
				     未知
				   </c:otherwise>
				</c:choose>
		           
	           
	            </div>
	          </div>
	        </div>
	      </li>
	       <li>
	        <div class="item-content">
	          <div class="item-inner">
	            <div class="item-title label">所在国家</div>
	            <div class="item-input">${userinfo.country}</div>
	          </div>
	        </div>
	      </li>
	      
	      
	      <li>
	        <div class="item-content">
	          <div class="item-inner">
	            <div class="item-title label">所在省份</div>
	            <div class="item-input">${userinfo.province}
	            </div>
	          </div>
	        </div>
	      </li>
	      
	      <li>
	        <div class="item-content">
	          <div class="item-inner">
	            <div class="item-title label">所在城市</div>
	            <div class="item-input">${userinfo.city}</div>
	          </div>
	        </div>
	      </li>
    </ul>
  </div>
  <c:if test="${memberShopReq.reqstate==0}">
	  <div class="content-block" id="btn">
	    <div class="row">
	      <div class="col-50" onclick="doaudit(-1);"><a href="#" class="button button-big button-fill button-danger">不同意</a></div>
	      <div class="col-50" onclick="doaudit(1);"><a href="#" class="button button-big button-fill button-success">同意</a></div>
	    </div>
	  </div>
	</div>
</c:if>
	<script type='text/javascript' src='<%=rootPath%>/static/js/jquery-3.1.1.min.js' charset='utf-8'></script>
	<script type='text/javascript' src='//g.alicdn.com/sj/lib/zepto/zepto.min.js' charset='utf-8'></script>
	<script type='text/javascript' src='//g.alicdn.com/msui/sm/0.6.2/js/sm.min.js' charset='utf-8'></script>
	<script type='text/javascript' src='//g.alicdn.com/msui/sm/0.6.2/js/sm-extend.min.js' charset='utf-8'></script>

	<script type="text/javascript">

		function doaudit(auditstate)
		{
			var ajaxurl="<%=rootPath%>/json/memberupaudit";
	         $.ajax({
	             type: "POST",
	             url: ajaxurl,//点击登录按钮走的action
	             data: {reqopenId:$("#reqopenId").val(), state:auditstate}, 
	             dataType: "json",
	             success: function(data){
	            	 if(data.flag == true){
	            		 $("#btn").hide();
	            		 $.toast(data.msg);
	            		 
	            	 } 
	             },
	             error: function(data){
	            	 $.toast(data.msg);
	             }
	         });	 
		}
		
		

	</script>

</body>
</html>